<%@ Page Title="Information Management System" Language="C#" MasterPageFile="~/Main.Master"
    AutoEventWireup="true" CodeBehind="ReportCategoryList.aspx.cs" Inherits="CARMS.AdminTemplate.ReportCategoryList" %>

<%@ Register Src="~/Controls/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/ConditionControl.ascx" TagName="ConditionControl" TagPrefix="ucc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script>
 
     
 
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="divSeperatorH10">
            </div> 
            <asp:Panel ID="Panel1" runat="server" DefaultButton="btnSearchReport">
                <table border="0" cellpadding="0" cellspacing="5">
                    <tr>
                        <td>
                            <ucc:ConditionControl runat="server" ID="controlCondition" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnSearchReport" runat="server" Text="Search" OnClick="btnSearchReport_Click"
                                SkinID="Button90" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="Button1" runat="server" Text="View All" OnClick="btnViewAll_Click"
                                SkinID="Button90" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <br />
            <fieldset>
                <legend>Report List</legend>
                <vs:GridView ID="gridReport" runat="server" AutoGenerateColumns="false" OnRowDataBound="gridReport_RowDataBound"
                    OnRowCommand="gridReport_RowCommand" OnClientRowDblClick="viewItem" AllowSorting="True"
                    DataKeyNames="ReportCategoryID">
                    <Columns>
                        <asp:TemplateField HeaderText="Edit" ItemStyle-Width="60px">
                            <ItemTemplate>
                                <asp:ImageButton ID="btnView" runat="server" SkinID="Modify" CommandName="ViewItem"
                                    CommandArgument='<%#Eval("ReportCategoryID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <vs:TemplateField HeaderText="Report Category ID" SortExpression="ReportCategoryID" ItemStyle-Width="100px">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("ReportCategoryID") %>'>
                                    <%#Eval("ReportCategoryID") %>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Report Category Name" SortExpression="ReportCategoryName" ItemStyle-Width="150px">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("ReportCategoryName") %>'>
                                    <%#Eval("ReportCategoryName") %>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>       <vs:TemplateField HeaderText="Creation Url"  ItemStyle-Width="150px">
                            <ItemTemplate>
                                <div class="divHidden" style="width:160px;" title='<%#Eval("CreationUrl") %>'>
                                    <%#Eval("CreationUrl")%>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                               <vs:TemplateField HeaderText="View Url"  ItemStyle-Width="150px">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 200px;" title='<%#Eval("ViewUrl") %>'>
                                    <%#Eval("ViewUrl")%>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Report Category Type" SortExpression="ReportCategoryType" ItemStyle-Width="100px">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='  <%#GetDataName((int)Eval("ReportCategoryType")) %>'>
                                    <%#GetDataName((int)Eval("ReportCategoryType")) %>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Operation"  ItemStyle-Width="100px">
                            <ItemTemplate>
                    <asp:ImageButton runat="server" ID="btnEditProperty" ToolTip="Edit Report Property"  CommandName="ModifyProperty" SkinID="Confirm"
                                    CommandArgument='<%#Eval("ReportCategoryID") %>' />
                            </ItemTemplate>
                        </vs:TemplateField>
                    </Columns>
                </vs:GridView>
                <uc1:GridPager ID="PageQueryAdapter1" runat="server" OnPerformGetCondition="PageQueryAdapter1_PerformGetCondition"
                    OnPerformGetRecordCount="PageQueryAdapter1_PerformGetRecordCount" OnPerformGetPageData="PageQueryAdapter1_PerformGetPageData"
                    TargetControlID="gridReport" PageSize="100" />
            </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
